package com.cooksys.film_rental.bo;

import java.util.List;

import com.cooksys.film_rental.model.Category;
import com.cooksys.film_rental.model.Film;

/**
 * Business object for the {@link Category} class
 * 
 * @author Peter Zastoupil
 * 
 */
public interface CategoryBo {

	/**
	 * 
	 * @param categoryId
	 *            the categoryId to search by
	 * @return a {@link Category} object that corresponds to the given
	 *         categoryId
	 */
	public Category getCategoryByCategoryId(Byte categoryId);

	/**
	 * 
	 * @param categoryId
	 *            a String representation of the categoryId to search by
	 * @return a {@link Category} object that corresponds to the given
	 *         categoryId
	 */
	public Category getCategoryByCategoryId(String categoryId);

	/**
	 * Searches the database for {@link Category} objects that match the given
	 * partial name
	 * 
	 * @param partialTitle
	 *            a String that contains search terms separated by whitespace
	 * @return a List of {@link Category} objects that match the given partial
	 *         title
	 */
	public List<Category> searchCategoriesByPartialName(String partialName);

	/**
	 * 
	 * @param film
	 *            the {@link Film} to search by
	 * @return a List of {@link Category} objects that are associated with the
	 *         given Film
	 */
	public List<Category> searchCategoriesByFilm(Film film);

	/**
	 * 
	 * @return a List of all {@link Category} objects in the database
	 */
	public List<Category> getAllCategories();

}
